#include "defaults.h"
#include "primitive.h"

using namespace std;

vector< vector<size_t > > Primitive::GenBinCoeffTable(int n) {
	vector< vector<size_t> > b(n + 1);
	for(size_t k = 0; k <= n; k++) {
		b[k].resize(k + 1);
		b[k][0] = 1;
		for(size_t i = 1; i <= k; ++i) {
			b[k][i] = 1;
			for(size_t j = i - 1; j > 0; --j) {
				b[k][j] += b[k][j - 1];
			}
		}
	}

	return b;
}

vector< vector<size_t> > Primitive::Bin = Primitive::GenBinCoeffTable(50);
